package com.xiaoxx.model.vo.jvm;

import com.xiaoxx.utils.date.LocalDateTimeUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import java.io.Serializable;

/**
 * @author :HX
 * @date : 2023/8/16
 */
@Data
@ToString(callSuper = true)
@ApiModel(value = "JvmInformationVO 对象", description = "5、Jvm--程序信息")
public class JvmInformationVO implements Serializable {
    private static final long serialVersionUID = -2710971801815452828L;
    @ApiModelProperty(notes = "java名称", position = 1)
    private String javaName;
    @ApiModelProperty(notes = "java版本", position = 2)
    private String javaVersion;
    @ApiModelProperty(notes = "jdk路径", position = 3)
    private String jdkPath;
    @ApiModelProperty(notes = "项目路径", position = 4)
    private String projectPath;
    @ApiModelProperty(notes = "程序pid", position = 4)
    private String pid;
    @ApiModelProperty(notes = "启用时间", position = 4)
    private String startTime;
    @ApiModelProperty(notes = "运行时长(已运行秒数)", position = 4)
    private Long runningTime;
    @ApiModelProperty(notes = "运行时长(已运行秒数)", position = 4)
    private String runningTimeString;
    @ApiModelProperty(notes = "jvm参数", position = 4)
    private String jvmArgs;

    public void setRunningTime(Long runningTime) {
        this.runningTime = runningTime;
        this.runningTimeString = LocalDateTimeUtil.convertTimeBySeconds(runningTime);
    }
}
